import 'package:fish_redux/fish_redux.dart';

class HomeworkState implements Cloneable<HomeworkState> {
  String id;
  String title;
  String demand;
  String content;
  String ideation;
  String grade;
  String articleType;
  String score;
  String classEntityName;
  String stime;
  String etime;
  String ctime;
  String status;
  String statuscn;
  String machineScore;
  String teacherScore;
  int minCharacterCount;
  int maxCharacterCount;
  int remarkcount;
  int notremarkcount;
  int notsubmit;
  int lowScore;
  int highScore;
  int fullScore;
  String indexno;
  int aiCounter;
  int submittedCount;
  int lowestScore;
  int reject;
  bool allowSubjectAssistant;
  bool allowPaste;
  bool digressCheck;
  bool similarityCheck;

  HomeworkState({
    this.id,
    this.title,
    this.demand,
    this.content,
    this.ideation,
    this.grade,
    this.articleType,
    this.score,
    this.classEntityName,
    this.stime,
    this.etime,
    this.ctime,
    this.status,
    this.statuscn,
    this.machineScore,
    this.teacherScore,
    this.minCharacterCount,
    this.maxCharacterCount,
    this.remarkcount,
    this.notremarkcount,
    this.notsubmit,
    this.lowScore,
    this.highScore,
    this.fullScore,
    this.indexno,
    this.aiCounter,
    this.submittedCount,
    this.lowestScore,
    this.reject,
    this.allowSubjectAssistant,
    this.allowPaste,
    this.digressCheck,
    this.similarityCheck,
  });

  factory HomeworkState.fromJson(Map<String, dynamic> json) {
    return HomeworkState(
      id: json['id'],
      title: json['title'],
      demand: json['demand'],
      content: json['content'],
      ideation: json['ideation'],
      grade: json['grade'],
      articleType: json['articleType'],
      score: json['score'],
      classEntityName: json['classEntityName'],
      stime: json['stime'],
      etime: json['etime'],
      ctime: json['ctime'],
      status: json['status'],
      statuscn: json['statuscn'],
      machineScore: json['machineScore'],
      teacherScore: json['teacherScore'],
      minCharacterCount: json['minCharacterCount'],
      maxCharacterCount: json['maxCharacterCount'],
      remarkcount: json['remarkcount'],
      notremarkcount: json['notremarkcount'],
      notsubmit: json['notsubmit'],
      lowScore: json['lowScore'],
      highScore: json['highScore'],
      fullScore: json['fullScore'],
      indexno: json['indexno'],
      aiCounter: json['aiCounter'],
      submittedCount: json['submittedCount'],
      reject: json['reject'],
      lowestScore: json['lowestScore'],
      allowSubjectAssistant: json['allowSubjectAssistant'],
      allowPaste: json['allowPaste'],
      digressCheck: json['digressCheck'],
      similarityCheck: json['similarityCheck'],
    );
  }

  @override
  HomeworkState clone() {
    return HomeworkState()
      ..id = id
      ..title = title
      ..demand = demand
      ..content = content
      ..ideation = ideation
      ..grade = grade
      ..articleType = articleType
      ..score = score
      ..classEntityName = classEntityName
      ..stime = stime
      ..etime = etime
      ..ctime = ctime
      ..status = status
      ..statuscn = statuscn
      ..machineScore = machineScore
      ..teacherScore = teacherScore
      ..minCharacterCount = minCharacterCount
      ..maxCharacterCount = maxCharacterCount
      ..remarkcount = remarkcount
      ..notremarkcount = notremarkcount
      ..notsubmit = notsubmit
      ..lowScore = lowScore
      ..highScore = highScore
      ..fullScore = fullScore
      ..indexno = indexno
      ..aiCounter = aiCounter
      ..submittedCount = submittedCount
      ..lowestScore = lowestScore
      ..allowSubjectAssistant = allowSubjectAssistant
      ..allowPaste = allowPaste
      ..digressCheck = digressCheck
      ..similarityCheck = similarityCheck;
  }

  @override
  String toString() {
    return 'HomeworkState{title: $title}';
  }
}
